//
//  NotificationListViewController.h
//  MapLink
//
//  Created by heng zhang on 21/05/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "NotificationGroupMapViewController.h"
#import "NotificationCell.h"

@class NotificationGroupMapViewController;

@interface NotificationListViewController : UIViewController <UITableViewDataSource, UITableViewDelegate> {
	IBOutlet UITableView *notificationTableView;
	IBOutlet UIActivityIndicatorView *activityIndicatorView;
	NSMutableArray *notifications;
	
	NSString *deviceID;
	NSString *userName;
	NSString *groupName;
	NSMutableData *buffer;
	NSURLConnection *conn;
	int newNotifications;
	
	NotificationGroupMapViewController *notificationMap;
}

@property (nonatomic, assign) NSString *deviceID;
@property (nonatomic, assign) NSString *userName;
@property (nonatomic, assign) NSString *groupName;
@property (nonatomic, retain) NSData *buffer;
@property (nonatomic) int newNotifications;

- (id) initWithDeviceID:(NSString *)strDeviceID withUserName:(NSString *)strUserName withGroupName:(NSString *) strGroupName withNumberOfNotifications:(int) number;
- (void) loadNotificationsFromDB;
- (void) refreshData;
- (void) processData:(NSMutableData *)data;

-(IBAction)cancel;

@end
